<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.itwill.ecom.product.ProductBeans"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	ArrayList<ProductBeans> categoryList = 
			(ArrayList<ProductBeans>)request.getAttribute("categoryList");
%>

<!-- 인기상품 -->
<div class="features_items">
	<h2 class="title text-center">카테고리 별 상품</h2>
	<%for(ProductBeans beans : categoryList){ %>
	<div class="col-sm-4">
		<div class="product-image-wrapper">
			<div class="single-products">
				<div class="productinfo text-center">
					<img src="../resources/images/product/<%=beans.getProduct_image0()%>" />
					<h4><%=beans.getProduct_name()%></h4>
					<p><fmt:formatNumber value="<%= beans.getProduct_price() %>" pattern=",###"/>원</p>
					<a href="productDetail?productno=<%=beans.getProduct_no() %>"
						class="btn btn-default add-to-cart"><i
						class="fa fa-shopping-cart"></i>상세보기</a>
				</div>
			</div>
		</div>
	</div>
	<%} %>
</div>
